package com.limh.readers.utils

import android.util.Log

/**
 * Function:
 * author: limh
 * time:2017/7/4
 */
object LogUtil {
    val LOG_LEVEL = 6
    val ERROR = 1
    val WARN = 2
    val INFO = 3
    val VERBOS = 4
    val DEBUG = 5

    fun e(tag: String, msg: String) {
        if (LOG_LEVEL > ERROR) {
            Log.e(tag, msg)
        }
    }

    fun i(tag: String, msg: String) {
        if (LOG_LEVEL > INFO) {
            Log.i(tag, msg)
        }
    }

    fun w(tag: String, msg: String) {
        if (LOG_LEVEL > WARN) {
            Log.w(tag, msg)
        }
    }

    fun v(tag: String, msg: String) {
        if (LOG_LEVEL > VERBOS) {
            Log.v(tag, msg)
        }
    }

    fun d(tag: String, msg: String) {
        if (LOG_LEVEL > DEBUG) {
            Log.d(tag, msg)
        }
    }

}